#!/bin/sh
sysmap=/proc/kallsyms

ext3_get_block_fn_addr=`cat ${sysmap} | grep -w ext3_get_block | cut -d ' ' -f 1`
ext3_get_inode_loc_addr=`cat ${sysmap} | grep -w ext3_get_inode_loc | cut -d ' ' -f 1`
ext3_mark_inode_dirty_addr=`cat ${sysmap} | grep -w ext3_mark_inode_dirty | cut -d ' ' -f 1`

ext4_get_block_fn_addr=`cat ${sysmap} | grep -w ext4_get_block | cut -d ' ' -f 1`
ext4_get_inode_loc_addr=`cat ${sysmap} | grep -w ext4_get_inode_loc | cut -d ' ' -f 1`
ext4_mark_inode_dirty_addr=`cat ${sysmap} | grep -w ext4_mark_inode_dirty | cut -d ' ' -f 1`

param="ext3_get_block_fn_addr=${ext3_get_block_fn_addr} ext3_get_inode_loc_addr=${ext3_get_inode_loc_addr} ext3_mark_inode_dirty_addr=${ext3_mark_inode_dirty_addr} ext4_get_block_fn_addr=${ext4_get_block_fn_addr} ext4_get_inode_loc_addr=${ext4_get_inode_loc_addr} ext4_mark_inode_dirty_addr=${ext4_mark_inode_dirty_addr}"
insmod camera.ko ${param}
